/**
 * 星标简历 页面
 */

var url = '';
var jsonData = '';
$(function(){
	//loadStarResume();
});

function commonAjax(){
	$.ajax({
		type : "POST",
		url: url,
	 	data : jsonData,
		dateType : "json",
		success: function(data) {
			 
		}
	});
}

function loadStarResume(){
	//TODO
	url = '';
	var returnData = commonAjax();
	var starResumeHtml = initStarResume(returnData);
	$("#starResume").html(starResumeHtml);
	
}

function deleteReaderById(id) {
	  
	$.confirm({
    	title: ' ',
    	content: '	您确认删除吗？',
			confirm: function(){
			//location.assign("delete.action?id=" + id );
				 window.location.href = "/analyzer/overview/skip?id="+id;
 			},
 			cancel: function(){
		
		}
});
}

function initStarResume(data) {
	var returnHtml = '';
	$.each(data, function(index, item) {
		var ind = index + 1;
		returnHtml += "<tr><td>"+ind+"</td>" +
						"<td title="+item.className+" rowspan='"+count+"'>"+item.className+"</td>" +
						"<td title="+item.topic+" rowspan='"+count+"'>"+item.topic+"</td>"+
						"<td title='"+item.qeustion+"'>"+question+"</td>" +
						"<td title="+item.media+">"+item.media+"</td>" +
						"<td title="+item.reporter+">"+item.reporter+"</td>" +
						"<td title="+item.reportNum+"><a href='javascript:;'>"+item.reportNum+"</a></td>" +
						"<td>"+"<a href='${request.contextpath}/personalResume?id="+item.id+">'>查看</a>"+"</td>"+
						"<td>"+"<button onclick='deleteReaderById("+item.id+")' class='btn btn-danger btn-xs'>删除</button>"+"</td></tr>";
		
	});
}